package com.pkx.guide.fcms.controller;

import com.pkx.guide.common.annotation.ORpose;
import com.pkx.guide.fcms.service.FcmsPlayService;
import com.pkx.guide.info.entity.TInfoGuide;
import com.sansi.tools.RetrunData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/fcms")
@Tag(name = "诱导屏设备控制器")
@Slf4j
@ORpose
public class FcmsPlayController {

    @Resource
    private FcmsPlayService fcmsPlayService;

    @Operation(summary = "获取显示屏当前亮度和调节模式")
    @GetMapping("/fcmsLightAndModeQurey")
    public RetrunData fcmsLightAndModeQurey(TInfoGuide guide) {
        return fcmsPlayService.fcmsLightAndModeQurey(guide);
    }

    @Operation(summary = "设置显示屏亮度和调节模式")
    @GetMapping("/fcmsLightAndModeSet")
    public RetrunData fcmsLightAndModeSet(TInfoGuide guide) {
        return fcmsPlayService.fcmsLightAndModeSet(guide);
    }

    @Operation(summary = "读取显示屏本地时间")
    @GetMapping("/fcmsTimeRead")
    public RetrunData fcmsTimeRead(TInfoGuide guide) {
        return fcmsPlayService.fcmsTimeRead(guide);
    }

    @Operation(summary = "设置显示屏本地时间")
    @GetMapping("/fcmsTimeSet")
    public RetrunData fcmsTimeSet(TInfoGuide guide) {
        return fcmsPlayService.fcmsTimeSet(guide);
    }

    @Operation(summary = "向显示屏设备上传播放表")
    @PostMapping("/fcmsUploadPlayList")
    public RetrunData fcmsUploadPlayList(@RequestBody TInfoGuide guide) {
        return fcmsPlayService.fcmsUploadPlayList(guide);
    }

    @Operation(summary = "读取显示屏当时显示画面")
    @GetMapping("/fcmsNowPictureQuery")
    public String fcmsNowPictureQuery(TInfoGuide guide) {
        return fcmsPlayService.fcmsNowPictureQuery(guide);
    }

    @Operation(summary = "读取所有显示屏当时显示画面")
    @GetMapping("/fcmsNowPictureQueryAll")
    public Boolean fcmsNowPictureQueryAll() {
        return fcmsPlayService.fcmsNowPictureQueryAll();
    }
}
